import { defineConfig } from 'umi';

export default defineConfig({
  outputPath: '../dist/app',
  base: '/',
  publicPath: '/',
  favicon:'/favicon.ico',
  nodeModulesTransform: {
    type: 'none',
  },
  routes: [
    { path: '/', redirect:'/app/blog' },
    { path: '/index', component: '@/pages/index' },
    { path: '/test', component: '@/pages/tests/test' },
    {
      path: '/app',
      name: '应用',
      //注册子路由
      routes: [
        {
          path: 'blog',
          microApp: 'blog',
        },
      ],
    },
  ],
  //注册qiankun应用
  qiankun: {
    master: {
      // 注册子应用信息
      apps: [
        // {
        //   name: 'blog',
        //   entry: 'http://www.traveller-dev.online/apps/blog/',
        // },
      ],
      //   jsSandbox: true, // 是否启用 js 沙箱，默认为 false
      //   prefetch: true, // 是否启用 prefetch 特性，默认为 true
    },
  },
});
